<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:include="inc/home::header">
</head>
<body>
	<!--推送-->
	<div class="push-a" >
		<div class="push-aa">
			<span>关闭</span>
		</div>
		<a  onclick="loadPage('/myplan')" >
			<div class="push-ab">
				你有<b th:text="${plansIn}">0</b>条未完成的计划，请尽快前往处理！
			</div>
		</a> <!-- <a target="_blank" href="#">
			<div class="push-ab">
				你有<b th:text="${wwc}">0</b>条未完成的维修计划，请尽快前往处理！
			</div>
		</a> -->
	</div>
	<!--推送END-->
	<div class="logo"></div>
	<div th:include="header :: header"></div>
	<div class="header-title">
		<span>维修保障设备</span>
		<div class="help-icon">
			<a href="password.html"><img src="images/password_icon.png" /></a> 
			<a href="/ietm/ietmhelp"><img src="images/help-icon.png" /></a>
			<a href="/data-retrieval"><img src="images/help-icon01.png" /></a>
            <a href="/logout"  ><img src="images/help-icon02.png" /></a>
            <a    href="#"  onclick="shutdown()"><img src="images/help-icon03.png" /></a>
		</div>
	</div>
	<div class="container">
		<div class="col-l">
			<div class="col-la" id="test-element"></div>
		</div>
		<div class="col-r">
			<!--右侧内容显示隐藏-->
			<div class="col-r-hide">
				<div class="col-ra">考试系统</div>
				<div class="col-rb">
					<div class="col-rb-pub">  
						<div class="col-rb-bg" onclick="loadPage('/questions/questions')"  shiro:hasPermission="sys:testquestions:testquestions" >
							<img src="images/icon-07.png" />
							<p>试题管理</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/paperManager/papers')"  shiro:hasPermission="sys:paper:paper">
							<img src="images/icon-08.png" />
							<p>试卷管理</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/examReport/report')"  shiro:hasPermission="sys:results:results">
							<img src="images/icon-11.png" />
							<p>成绩报表</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/examReport/wtake')"  shiro:hasPermission="sys:taketest:taketest">
							<img src="images/icon-09.png" />
							<p>参加考试</p>
						</div>
						<div class="col-rb-bg"
							onclick="loadPage('/examReport/my-grade')"  shiro:hasPermission="sys:mygrades:mygrades">
							<img src="images/icon-10.png" />
							<p>我的成绩</p>
						</div>
					</div>
				</div>
			</div>
			<div class="col-r-hide">
				<div class="col-ra">常用工具</div>
				<div class="col-rb">
					<div class="col-rb-pub">
						<div class="swiper-container" style="height: 510px" id="tool">
							<div class="swiper-wrapper" id="ietmSlide">
								<div class="swiper-slide">
									<div class="col-rb-bgl">
										<img src="images/icon-24.png" />
										<p onclick="loadPage('/EquipmentPrinciple')">装备工作原理计算公式</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl col-rb-bgll">
										<img src="images/icon-25.png" />
										<p onclick="loadPage('/EquipmentDeployment')">装备部署示意软件</p>
										<div class="col-del"></div>
									</div>
								
									<div class="col-rb-bgl" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-26.png" />
										<p>指南针</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl col-rb-bgll" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-27.png" />
										<p>手电筒</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-28.png" />
										<p>文字处理软件</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl col-rb-bgll" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-29.png" />
										<p>翻译软件</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-30.png" />
										<p>视频播放器</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl col-rb-bgll" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-31.png" />
										<p>图形处理软件</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp\\knetscan.exe')">
										<img src="images/icon-32.png" />
										<p>地图</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl col-rb-bgll"  onclick="runTimeCmd('C:\\\\Program Files\\\\PLSQL Developer\\\\plsqldev.exe')">
										<img src="images/icon-33.png" />
										<p>课件制作器</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl" onclick="runTimeCmd('G:\\kinggsoft\\kduu_ba\\sp7\\knetscan.exe')">
										<img src="images/icon-34.png" />
										<p>军用单机杀毒软件</p>
										<div class="col-del"></div>
									</div>
									<div class="col-rb-bgl col-rb-bgll">
										<img src="images/icon-35.png" />
										<p>视频影像工具</p>
										<div class="col-del"></div>
									</div>
								</div>
								<div class="swiper-slide">
									<div class="col-rb-bgl" onclick="runTimeCmd('notepad')" >
										<img src="images/icon-36.png" />
										<p >记事本</p>
										<div class="col-del"></div>
									</div>
										<div class="col-rb-bgl col-rb-bgll" onclick="runTimeCmd('C:\\Program Files(x86)\\Notepad++\\notepad++.exe')">
										<img src="images/icon-26.png" />
										<p>北斗</p>
										<div class="col-del"></div>
									</div>
								</div>
							</div>
							<div class="swiper-pagination" id="tool-pagination"></div>
						</div>
					</div>
				</div>
			</div>
			<div class="col-r-hide">
				<div class="col-ra">用户文档</div>
				<div class="col-rb">
					<div class="col-rb-pub">
						<div class="col-rb-bg" onclick="loadPage('/documentation')">
							<img src="images/icon-37.png" />
							<p>法规规范文档</p>
						</div>
					</div>
				</div>
			</div>
			<div class="col-r-hide">
				<div class="col-ra">系统设置</div>
				<div class="col-rb">
					<div class="col-rb-pub">
						 	<div class="swiper-container" style="height:510px" id="sys">
						  	  <div class="swiper-wrapper">
						  	  	<div class="swiper-slide">
								   <div class="col-rb-bg" onclick="loadPage('/networkSet')"    shiro:hasPermission="sys:xxsz:xxsz">
									<img src="images/icon-18.png" />
									<p>网络设置</p>
									</div>
									<div class="col-rb-bg"   onclick="runTimeCmd('C:\\VRV\\PCCA\\VRVPerManagement.exe')"  shiro:hasPermission="sys:aqjm:aqjm">
										<img src="images/icon-19.png" />
										<p>安全加密设置</p>
									</div>
									<div class="col-rb-bg"   onclick="runTimeCmd('C:\\VRV\\PCCA\\VRVPerManagement.exe')"   shiro:hasPermission="sys:wbsb:wbsb">
										<img src="images/icon-20.png" />
										<p>外设接入授权设置</p>
									</div>
									<div class="col-rb-bg" onclick="loadPage('/FactorySettings')"  shiro:hasPermission="sys:hfcc:hfcc">
										<img src="images/icon-21.png" />
										<p>恢复设备出厂设置</p>
									</div>
									<div class="col-rb-bg" onclick="runTime('notepad.exe')"   shiro:hasPermission="sys:sdzh:sdzh">
										<img src="images/icon-22.png" />
										<p>软件手动自毁</p>
									</div>
									<div class="col-rb-bg"  onclick="location='data-clean.html'"  shiro:hasPermission="sys:sjbf:sjbf">
										<!-- <img src="images/icon-23.png" />
										<p>装备日志备份</p> -->
										 		<img src="images/icon-15.png" />
						   	  	        <p>数据库清理与备份</p>
										
									</div>
							  	</div>
							  </div>
							</div>
					</div>
				</div>
			</div>
			<div class="col-r-hide">
				<div class="col-ra">个人中心</div>
				<div class="col-rb">
					<div class="col-rb-pub">
						<div class="col-rb-bg" onclick="loadPage('/planType')" shiro:hasPermission="sys:myplan:myplan"  >
							<img src="images/icon-12.png" />
							<p>计划管理</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/user')"          shiro:hasPermission="sys:user:user">
							<img src="images/icon-13.png" />
							<p>用户管理</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/permissions')"   shiro:hasPermission="sys:permissions:permissions">
							<img src="images/icon-14.png" />
							<p>权限管理</p>
						</div>
						<div class="col-rb-bg" onclick="location='dataBackup.html'"  shiro:hasPermission="sys:bfrh:bfrh">
							<img src="images/icon-15.png" />
							<p>数据备份融合</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/log')"  shiro:hasPermission="sys:personallog:personallog">
							<img src="images/icon-16.png" />
							<p>日志</p>
						</div>
						<!-- onclick="location='self-diagnosis.html'" -->
						<div class="col-rb-bg"   onclick="loadPage('/self-diagnosis')"  shiro:hasPermission="sys:selfDiagnosis:selfDiagnosis">
							<img src="images/icon-17.png" />
							<p>自诊断</p>
						</div>
					</div>
				</div>
			</div>
			<div class="col-r-hide">
				<div class="col-ra">故障诊断</div>
				<div class="col-rb">
					<div class="col-rb-pub">
						<div class="col-rb-bg" onclick="loadPage('/ZbLog')" shiro:hasPermission="sys:gzzdrz:gzzdrz"  >
							<img src="images/icon-01.png" />
							<p>装备日志</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/faultEntry')"   shiro:hasPermission="sys:sglr:sglr">
							<img src="images/icon-02.png" />
							<p>故障手工录入</p>
						</div>
						<div class="col-rb-bg" onclick="location='/zbdzll'"    shiro:hasPermission="sys:dzll:dzll">
							<img src="images/icon-03.png" />
							<p>装备电子履历</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/Zmonitoring')"   shiro:hasPermission="sys:ztcj:ztcj">
							<img src="images/icon-04.png" />
							<p>状态采集与监控</p>
						</div>
						<div class="col-rb-bg" onclick="loadPage('/Spare/spare','N')"   shiro:hasPermission="sys:sbjgl:sbjgl">
							<img src="images/icon-05.png" />
							<p>备件管理</p>
						</div>

					</div>
				</div>
			</div>
			<style>
   
	        [v-cloak] {
	            display: none;
	        }
    	</style>
			<div class="col-r-hide" style="display: block">
				<div class="col-ra">交互式培训系统</div>
				<div class="col-rb">
					<div class="col-rb-pub">
						<div class="swiper-container" style="height: 510px" id="ietm">
							<div class="swiper-wrapper">
							
								
								<div class="swiper-slide">
									 <div v-for="(ietm,index) in ietms" class="col-rb-bg" v-on:click="location(ietm.id)" v-if='index<6' >
										<img src="images/icon-06.png" />
										<p v-cloak>{{ietm.title}}</p>
									</div>
								</div> 
								<div class="swiper-slide">
									 <div v-for="(ietm,index) in ietms" class="col-rb-bg" v-on:click="location(ietm.id)" v-if='index>5' >
										<img src="images/icon-06.png" />
										<p v-cloak>{{ietm.title}}</p>
									</div>
								</div> 
							</div>
								<div class="swiper-pagination" id="ietm-pagination"></div>
						</div>
							
						</div>
					</div>
				</div>
			<!--右侧内容显示隐藏end-->
		</div>
	</div>
	<script type="text/javascript" src="js/swiper.js"></script>
	<script type="text/javascript">
	/*<![CDATA[*/
	           
	           
	           
	           
	                
	      /**
	       * 设置cookie
	       * @param name cookie的名称
	       * @param value cookie的值
	       * @param day cookie的过期时间
	       */
	      var setCookie = function (name, value, day) {
	        if(day !== 0){     //当设置的时间等于0时，不设置expires属性，cookie在浏览器关闭后删除
	          var expires = day * 24 * 60 * 60 * 1000;
	          var date = new Date(+new Date()+expires);
	          document.cookie = name + "=" + escape(value) + ";expires=" + date.toUTCString();
	        }else{
	          document.cookie = name + "=" + escape(value);
	        }
	      };   
	      
	      
	      
	      /**
	       * 获取对应名称的cookie
	       * @param name cookie的名称
	       * @returns {null} 不存在时，返回null
	       */
	      var getCookie = function (name) {
	        var arr;
	        var reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
	        if (arr = document.cookie.match(reg))
	          return unescape(arr[2]);
	        else
	          return null;
	      };
	           
	           
	       var delCookie = function (name) {
	    	   alert("1")
	    	        setCookie(name, 0, -1);
	    	 };
	    	 var sys = new Swiper('#sys', {
			      observer:true,//修改swiper自己或子元素时，自动初始化swiper  
	              observeParents:true//修改swiper的父元素时，自动初始化swiper  
			    });
	    	 
	    	 var tool = new Swiper('#tool', {
			      observer:true,//修改swiper自己或子元素时，自动初始化swiper  
	              observeParents:true,//修改swiper的父元素时，自动初始化swiper  
			      pagination: {
			        el: '#tool-pagination',
			      },
			    });
		    //旋转盘
		    var settings = [ 
			        {image:'images/zzsc1.png'},
					{image:'images/zzsc2.png'}, 
					{image:'images/zzsc3.png'}, 
					{image:'images/zzsc4.png'}, 
					{image:'images/zzsc5.png'},
					{image:'images/zzsc6.png'},
					{image:'images/zzsc7.png'}
				];
			var options = {
				circle_radius:220,
				normal_feature_size:90,
				highlighted_feature_size:90,
				top_margin:130,
				type: 'image'
			};
			var fp = new FeaturePresenter($("#test-element"), settings, options);
			fp.createPresenter();
			window.oncontextmenu = function(){return false;}
			$(function() {
	           $('#test-element>div:eq(0)>div img').each(function(i){
					$(this).click(function(){
						$('.col-r-hide').hide();
						//if(i===2){
							//window.open('documentation.html','_self');
						//}else{
						
							$('.col-r-hide:eq('+i+')').show();
						//}
					});
					
			   });
			   //推送关闭
			   $(".push-aa").click(function(){
			   	  $(".push-a").fadeOut(1000);
			   });
			   $(".col-rb-bgl").contextmenu(function() {
					//pad长按选中，pc右键选中
					$(".col-del").show();
					$(".button-qx").show();
			   });
			   $(".button-qx").click(function(){
			   	   $(this).hide();
			   	   $(".col-del").hide();
			   });
			});
			
			
			function runTimeCmd(path,name) {
				   var  obj={path:path,name:name}
				   $.post("Tool/runTimeCmd",obj);
			};
		
			function runTimeSystem(path,name) {
				   var  obj={path:path,name:name}
				   $.post("Tool/runTimeSystem",obj);
			};
			
			function logout() {
			
				delCookie("messages");
			    $.post("/logout");
			    
			};
			
			function shutdown() {
				
				$.Zebra_Dialog(
						'<div class="prompt"><div class="success-icon"></div><div class="success-title">确定关机？</div></div>',
						{
							'title' : '提示',
							'buttons' : [ {
								caption : '确定',
								callback : function() {
								    $.post("/Tool/shutdown");
								    
								}
							} ]
						});
				
				
			
			    
			};
			
			/*]]>*/
		</script>





	<script th:inline="javascript">  
/*<![CDATA[*/  

		 var plansIn = [[${plansIn}]]; 
		 var total=getCookie("messages");

		 if(total==null){
			 $(".push-a").show();
			 setCookie("messages",1,0);
		 }
	     
	      
	 
/*]]>*/  
</script>
<script>
var v=new Vue({
	el:"#ietm",
	data:{
		ietms:[]
	},
	mounted:function(){
		var that=this;
		$.get('/ietm/data/1',function(data){
			that.ietms=data.pms;
			 new Swiper('#ietm', {
			      observer:true,//修改swiper自己或子元素时，自动初始化swiper  
	              observeParents:true,//修改swiper的父元素时，自动初始化swiper  
			      pagination: {
			        el: '#ietm-pagination',
			      },
			    });
		})
	},
	methods:{
		location:function(key){
			location='interactive.html?pmId='+key;
		}
	}
});
</script>
</body>
</html>
